package com.wangxinyuchuan.demo.adapter.extend_mode;

import java.io.IOException;

/**
 * @author wangxinyuchuan
 * @date 2023/4/9 10:21 PM
 */
public class Main {
    public static void main(String[] args) {
        FileIO f = new FileProperties();
        try {
            System.out.println("begin...........");
            long startTIme = System.currentTimeMillis();
            f.readFromFile("design-mode-homework/src/main/java/com/wangxinyuchuan/demo/adapter/file.txt");
            f.setValue("year", "2004");
            f.setValue("month", "4");
            f.setValue("day", "21");
            f.writeToFile("design-mode-homework/src/main/java/com/wangxinyuchuan/demo/adapter/newFile2.txt");
            System.out.println("end...........\n耗时:" + (System.currentTimeMillis() - startTIme) + "ms");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
